import { Http } from '../../utils/http';

/**
 * 获取手机验证码
 * @param {*} mobile
 * @param {*} phone
 * @param {*} nick_name
 * @param {*} code
 */
export function getSignForCode({ payload }) {
  const { mobile, wechat, nick_name, code } = payload;
  let params = {};
  params['mobile'] = mobile;
  params['wechat'] = wechat;
  params['nick_name'] = nick_name;
  params['code'] = code;
  return Http.Post(`/api/login`, params);
}
/**
 * 用户注册
 */
export function getRegister(UserName, Password, ValidCode, RandomGuid) {
  let params = {};
  params['UserName'] = UserName;
  params['Password'] = Password;
  params['ValidCode'] = ValidCode;
  params['RandomGuid'] = RandomGuid;
  return Http.Get(`user/Handler.ashx?action=703`, params);
}
/**
 * 获取验证码
 * @param {*} Mobile 
 */
export function getCode(mobile) {
  let params = {};
  params['mobile'] = mobile;
  return Http.Post(`/api/send/check/code`, params);
}
/**
 * 获取用户信息
 * @param {*} UserIDGuid
 */
export function getUserInfo(token) {
  let params = { token: token };
  return Http.Get(`/api/current/user`, params);
}

